POV-Ray : Newsgroups : povray.general : condition parsed as vector : Re: condition parsed as vector Server Time
8 Aug 2024 06:20:06 EDT (-0400)
  Re: condition parsed as vector  
From: Chris Huff
Date: 16 Feb 2001 07:43:18
Message: <chrishuff-D99362.07430916022001@news.povray.org>
In article <3a8c3b87$1@news.povray.org>, "Thorsten Froehlich" 
<tho### [at] trfde> wrote:

> And as you know from the documentation, there
> are no comparison operators for vectors.

Actually, there are...they are done component by component, and the 
results are stored in another vector. In other words, < 1, 2, 3> = < 2, 
2, 3> will result in < 0, 1, 1>.

From the POV-Ray manual:
"Operations are performed on a component-by-component basis. For example 
<1,2,3> + <4,5,6> evaluates the same as <1+4,2+5,3+6>  or <5,7,9>. Other 
operations are done on a similar component-by-component basis. For 
example (<1,2,3> = <3,2,1>) evaluates to <0,1,0> because the middle 
components are equal but the others are not. Admittedly this isn't very 
useful but its consistent with other vector operations."

The problem is just that conditionals need float parameters.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.